<?php

use UC_PHP\FileSystem as FS;

$file = FS\FileSystem::create_text_file('./test_dir/testfile.txt');
$file->write_line('the first line.');
$file->write_line('the second line.');
$file->write_line('the third line.');
$file->close();

$file = FS\FileSystem::open_text_file(
    './test_dir/testfile.txt', FS\IO_Mode::FOR_READING);

while(!$file->at_end_of_stream())
{
    echo $file->read_line() . '<br/ >';
}

$file->close();
